<?php  

include "headerVerify.php";
include "connect.php";

//New Details
$actual_link = $_POST['actual_link'];
$productID = $_POST['productID'];
$newProductCategory = $_POST['productCategory'];
$newProductName = $_POST['productName'];
$newProductCost = $_POST['productCost'];
$newProductDescription = $_POST['productDescription'];
$newOnTrial = $_POST['onTrial'];
$newKeywords = $_POST['keywords'];

mysql_query("UPDATE products SET 

productCategory = '$newProductCategory',
productName = '$newProductName',
productCost = '$newProductCost',
productDescription = '$newProductDescription',
onTrial = '$newOnTrial',
keywords = '$newKeywords'

WHERE productID = $productID");

//Update Message
$_SESSION['updateMessage'] = 

"Product: ".$productID." Details Have Been Saved";

//Direct user back to the product page
header("Location: $actual_link");

?>